The Domain Name System (DNS) is used for translating domain names into IP addresses and is an essential part of the Internet. DNS is composed of nameservers that are typically accessed in a recursive manner to obtain the IP address for a requested domain name. For example, a DNS query for an address record is received for “www.example.com” by a nameserver (sometimes referred to as a resolver). This resolver is commonly provided by the client's Internet Service Provider (ISP) or through a public resolver. If the DNS record that answers the query is not in the nameserver's local cache, the nameserver queries the authoritative DNS hierarchy to find the answer. Upon receiving a query that is not in its cache, the resolver may generate and send a DNS query to root DNS nameservers, which can include several nameservers. A root nameserver responds to the DNS query with an answer including an IP address of one or more authoritative name servers serving the “.com” domain. The nameserver then sends a DNS query to the one or more authoritative name servers for the “.com” domain, which then responds with an IP address of one or more authoritative name servers of the domain “example.com”. In some cases, this process is repeatedly performed between the nameserver and the one or more authoritative nameservers until a response is received, where the response can be either an IP address for the requested domain or a server failure message. When the IP address for “www.example.com” is located, the authoritative nameserver for “example.com” sends the IP address to the nameserver. The IP address is then returned to the requesting device, and the requesting device can issue an HTTP request using the IP address for “www.example.com”.
There are many factors that affect how fast a resolver is. A main factor is whether the resolver can answer from its cache. If it can, then the time to answer is the round-trip time for a packet from the requester to the resolver. If it cannot, then the time to answer is affected by the recursive lookup.
A resolver service may include many different resolvers in one or more data centers. The resolver IP addresses are typically anycast addresses. As a result, the particular resolver that handles answering the DNS query is the one that is nearest to the requester. Within a data center, there may be multiple nodes (e.g., hundreds of nodes) operating as a cluster. Each particular node may have its own local cache. To manage these caches, a common solution is to put a caching load balancer in front of each of these nodes. However, this introduces a single point-of-failure.